A computer can have a shared resource (e.g., a data structure or a portion of computer memory) and a policy specifying that, at any given time, the shared resource can be accessed by only one thread or process. Mutual exclusion (mutex) techniques can be used to implement the policy. Some mutex techniques include busy waiting. When a first thread or process is accessing the shared resource, if a second thread or process attempts to access the shared resource, a mutex object can cause the second thread or process to wait. The mutex object can then repeatedly examine status of the shared resource to determine if the first thread or process stopped accessing the shared resource. If the first thread or process stopped accessing the shared resource, the mutex object can allow the second thread or process to access the shared resource.